package com.situ.day3;

import org.junit.Test;

public class ConstructorDemo {

	@Test
	public void test1() {
		Student student = new Student();
		student.id = 1;
		student.name = "zhangsan";
		student.className = "UI";
		student.study();
		student.study();
		
		Student stu = new Student(2, "lisi", 20, "Java1812");
		System.out.println(stu.age);
		stu.age = 28;
		System.out.println(stu.age);
	}
	
	@Test
	public void test23() {
		Student stu = new Student(2, "lisi", 20, "Java1812");
		//System.out.println(stu.id);
		System.out.println(stu.getId());
		//stu.id = 34;
		stu.setId(34);
		System.out.println(stu.getId());
		stu.setAge(200);
		System.out.println(stu.getAge());
		
		String name = "lisi";
		if (name.equals(stu.getName())) {
			System.out.println("相等");
		} else {
			System.out.println("不相等");
		}
	}
	
	
	
	
	
	
	
	
	
}
